home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19970326-19970626
/
000031_news@columbia.edu _Tue Apr 1 15:55:33 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA27401
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 1 Apr 1997 15:55:32 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id PAA29015
for kermit.misc@watsun; Tue, 1 Apr 1997 15:55:32 -0500 (EST)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Assigning a script to a key...
Date: 1 Apr 1997 20:55:29 GMT
Organization: Columbia University
Lines: 50
Message-ID: <5hrso1$q7q$1@apakabar.cc.columbia.edu>
References: <5hrqhh$9at$1@news.vanderbilt.edu>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:6846
In article <5hrqhh$9at$1@news.vanderbilt.edu>,
<don.eddleman@mcmail.vanderbilt.edu> wrote:
: I would like to assign a script to a key. It appears that this is not
: possible with the set key command.
:
Sure, it's possible. (And knowing who you are, I deduce you are talking
about Kermit 95 :-) But what you are really asking is whether it is
possible to have a mixture of scripts (macros) and "kverbs" in a key
definition. And yes, that's possible too.
: The script needs to set printer to a file, do a Kdump of the current
: screen, and then set the printer back to PRN. As you can see, what I
: really want to do is get a screen scrape of the current emulator screen
: when a user hits a specially defined key. Is there another way to do
: this?
:
The obvious way to do this would be:
define x1 set printer screen.txt
define x2 set printer, connect
set key \368 \Kx1\Kdump\Kx2
(\Kdump is a built-in Kverb; \Kx1 and \Kx2 are macros masquerading as
Kverbs.) Unfortunately, this doesn't work because at the time the \Kdump
verb is executed, the command screen is active instead of the terminal
screen. That is, \Kdump is executing in the wrong context. I can't think
of any way to force it to execute in the other context. You might think:
define x1 set printer screen.txt, connect
define x2 set printer, connect
set key \368 \Kx1\Kdump\Kx2
would do it, but for some reason it doesn't. However, you can do something
like this:
define x1 set printer screen.txt, connect
define x2 set printer, connect
set key \368 \Kx1
set key \369 \Kx2
In this case the F1 key sets the printer to be the file, SCREEN.TXT, and
F2 sets it back to the default (PRN).
The Alt-p key has \Kdump assigned to it by default. So:
Alt-p Prints to current SET PRINTER device or file
F1 Alt-p Prints to SCREEN.TXT file
F2 Alt-p Prints to PRN
- Frank